package com.vmj.instructions.control;

import com.vmj.instructions.base.NoOperandsInstruction;
import com.vmj.rtda.Frame;

/**
 * Created by yangshoujun on 2017/9/2 下午3:30.
 */
public class FReturn extends NoOperandsInstruction {

    @Override
    public void execute(Frame frame) {
        com.vmj.rtda.Thread thread = frame.getThread();
        Frame currentFrame = thread.popFrame();
        Frame invokerFrame = thread.getCurrentFrame();
        float retVal = currentFrame.getOperandStack().popFloat();
        invokerFrame.getOperandStack().pushFloat(retVal);
    }
}
